<template>
  <div class="login-container">
    <div class="login-card">
      <div class="login-header">
        <h2>注册类型选择</h2>
        <p>请选择您要注册的账号类型</p>
      </div>

      <div class="register-options">
        <el-button>
        </el-button>
        <el-button
            type="primary"
            @click="goToStudentRegister"
            class="option-button"
        >
          <div class="option-content">
            <el-icon size="24"><User /></el-icon>
            <span>学员注册</span>

          </div>
        </el-button>

        <el-button
            type="primary"
            @click="goToCoachRegister"
            class="option-button"
        >
          <div class="option-content">
            <el-icon size="24"><Avatar /></el-icon>
            <span>教练注册</span>

          </div>
        </el-button>

        <el-button
            plain
            @click="goToLogin"
            class="option-button"
        >
          <div class="option-content">
            <el-icon size="24"><Back /></el-icon>
            <span>返回登录</span>
          </div>
        </el-button>
      </div>
    </div>
  </div>
</template>

<script setup>
import { User, Avatar, Back } from '@element-plus/icons-vue'
import { useRouter } from 'vue-router'

const router = useRouter()

const goToStudentRegister = () => {
  router.push('/register/student')
}

const goToCoachRegister = () => {
  router.push('/register/coach')
}

const goToLogin = () => {
  router.push('/')
}
</script>

<style scoped>
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f5f7fa;
}

.login-card {
  width: 450px;
  padding: 40px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header h2 {
  color: #333;
  margin-bottom: 8px;
}

.login-header p {
  color: #666;
  font-size: 14px;
}

.register-options {
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.option-button {
  height: auto;
  padding: 20px;
  text-align: left;
}

.option-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.option-content span {
  font-size: 20px;
  font-weight: bold;
}

.option-content p {
  margin: 0;
  font-size: 12px;
  color: #666;
}
</style>